#include<stdio.h>
#include<string.h>
#include<unistd.h>
int main()
{
  FILE *pf = fopen("log.txt", "w");

  if(pf == NULL)
  {
    perror("fopen:");
  }

  const char *s1 = "hello fwirte\n";
  fwrite(s1, strlen(s1), 1, pf);
  const char *s2 = "hello fprintf\n";
  fprintf(pf, "%s", s2);
  const char *s3 = "hello fputs\n";
  fputs(s3, pf);
  fclose(pf);
}
